/* 商城样式文件 */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

/* 商品卡片样式 */
.product-card {
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* 价格样式 */
.product-price {
    font-weight: 700;
    color: var(--danger-color);
    font-size: 1.2rem;
}

.product-original-price {
    text-decoration: line-through;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 徽章样式 */
.badge-hot {
    background-color: var(--danger-color);
}

.badge-new {
    background-color: var(--success-color);
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    padding: 4rem 0;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* 分类卡片样式 */
.category-card {
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

.page-link {
    color: var(--primary-color);
    border-color: #e3e6f0;
    margin: 0 0.2rem;
    border-radius: 0.35rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 筛选区域样式 */
.filter-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sort-section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

/* 无内容提示样式 */
.no-products {
    text-align: center;
    padding: 3rem 0;
    color: var(--secondary-color);
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* 商品详情页样式 */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.product-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.product-info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e3e6f0;
}

.product-info-item:last-child {
    border-bottom: none;
}

.product-info-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.product-info-value {
    color: var(--dark-color);
}

/* 数量选择器样式 */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    overflow: hidden;
    width: fit-content;
}

.quantity-selector button {
    border: none;
    background-color: var(--light-color);
    color: var(--dark-color);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-selector button:hover {
    background-color: var(--primary-color);
    color: white;
}

.quantity-selector input {
    border: none;
    text-align: center;
    width: 50px;
    height: 36px;
}

/* 标签页样式 */
.nav-tabs .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom: 3px solid var(--primary-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
    padding-left: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .product-card .card-img-top {
        height: 150px;
    }
}